package com.zzk.protect.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 
 * @TableName herbal_template_detail
 */
@TableName(value ="herbal_template_detail")
public class HerbalTemplateDetail {
    /**
     * Primary key ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * Herbal template ID
     */
    @TableField(value = "template_id")
    private Integer templateId;

    /**
     * Herbal ID
     */
    @TableField(value = "herbal_id")
    private Integer herbalId;

    /**
     * Dosage
     */
    @TableField(value = "dosage")
    private String dosage;

    /**
     * Unit
     */
    @TableField(value = "unit")
    private String unit;

    /**
     * Footnote
     */
    @TableField(value = "footnote")
    private String footnote;

    /**
     * Primary key ID
     */
    public Integer getId() {
        return id;
    }

    /**
     * Primary key ID
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * Herbal template ID
     */
    public Integer getTemplateId() {
        return templateId;
    }

    /**
     * Herbal template ID
     */
    public void setTemplateId(Integer templateId) {
        this.templateId = templateId;
    }

    /**
     * Herbal ID
     */
    public Integer getHerbalId() {
        return herbalId;
    }

    /**
     * Herbal ID
     */
    public void setHerbalId(Integer herbalId) {
        this.herbalId = herbalId;
    }

    /**
     * Dosage
     */
    public String getDosage() {
        return dosage;
    }

    /**
     * Dosage
     */
    public void setDosage(String dosage) {
        this.dosage = dosage;
    }

    /**
     * Unit
     */
    public String getUnit() {
        return unit;
    }

    /**
     * Unit
     */
    public void setUnit(String unit) {
        this.unit = unit;
    }

    /**
     * Footnote
     */
    public String getFootnote() {
        return footnote;
    }

    /**
     * Footnote
     */
    public void setFootnote(String footnote) {
        this.footnote = footnote;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HerbalTemplateDetail other = (HerbalTemplateDetail) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTemplateId() == null ? other.getTemplateId() == null : this.getTemplateId().equals(other.getTemplateId()))
            && (this.getHerbalId() == null ? other.getHerbalId() == null : this.getHerbalId().equals(other.getHerbalId()))
            && (this.getDosage() == null ? other.getDosage() == null : this.getDosage().equals(other.getDosage()))
            && (this.getUnit() == null ? other.getUnit() == null : this.getUnit().equals(other.getUnit()))
            && (this.getFootnote() == null ? other.getFootnote() == null : this.getFootnote().equals(other.getFootnote()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTemplateId() == null) ? 0 : getTemplateId().hashCode());
        result = prime * result + ((getHerbalId() == null) ? 0 : getHerbalId().hashCode());
        result = prime * result + ((getDosage() == null) ? 0 : getDosage().hashCode());
        result = prime * result + ((getUnit() == null) ? 0 : getUnit().hashCode());
        result = prime * result + ((getFootnote() == null) ? 0 : getFootnote().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", templateId=").append(templateId);
        sb.append(", herbalId=").append(herbalId);
        sb.append(", dosage=").append(dosage);
        sb.append(", unit=").append(unit);
        sb.append(", footnote=").append(footnote);
        sb.append("]");
        return sb.toString();
    }
}